<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/rain.css">
</head>
<body>
    <div class="content">
        <div class="yudi"></div>
    </div>
</body>
<script src="../js/jquery-2.1.1.min.js"></script>
<script>
    let $content = $('.content');
    let initNumber = 0;
    for (let index = 0; index < 30; index++) {
        const lefts = (Math.floor(Math.random()*5+2))
        const delay = (Math.floor(Math.random()*5+2))
        initNumber+=lefts;
        let div = $('<div/>').addClass('yudi').css({
            "left":`${initNumber}%`,
            "top":`${lefts}`,
            "animation-delay":`${delay/10}s`
        })
        $content.append(div)
    }
</script>
</html>